package com.xywh.dakaqiandao.mvp.ui.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xywh.dakaqiandao.R;
import com.xywh.dakaqiandao.mvp.ui.entity.MySalary;

import java.util.List;


public class MySalaryAdapter extends BaseQuickAdapter<MySalary, BaseViewHolder> {

    private Context mContext;

    public MySalaryAdapter(Context context, @Nullable List<MySalary> data) {
        super(R.layout.item_my_salary, data);
        this.mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, MySalary item) {
        //GlideUtil.loadImage(mContext,item.getImg(),helper.getView(R.id.img_head));
        helper.setText(R.id.tv_title, "工资发放年月：" + item.getYearday());
        helper.setText(R.id.tv_content, "工资实发金额：" + item.getShifagongzi() + "元");

        TextView tv_status = helper.getView(R.id.tv_status);
        if (item.getStatus().equals("0")) {
            tv_status.setText("未确认");
        } else if (item.getStatus().equals("1")) {
            tv_status.setText("已确认");
        }
    }

}
